import React from 'react';
import {
  StyleSheet,
  Text,
  View,
  ImageBackground,
  Dimensions,
} from 'react-native';

const {width} = Dimensions.get('window');

const DefaultSlide = (props) => {
  const style = {
    backgroundColor: props.backgroundColor,
    width: props.width,
    flex: 1,
    //paddingBottom: props.bottomButton ? 132 : 64,
  };
  return (
    <View style={[styles.mainContent, style]}>
      <ImageBackground
        source={props.image}
        style={[styles.imageSlideBg, props.imageStyle]}>
        <Text style={[styles.title, props.titleStyle]}>{props.title}</Text>

        <Text style={[styles.text, props.textStyle]}>{props.text}</Text>
      </ImageBackground>
    </View>
  );
};

const styles = StyleSheet.create({
  mainContent: {
    justifyContent: 'space-around',
    alignItems: 'center',
  },
  imageSlideBg: {
    flex: 1,
    justifyContent: 'center',
  },
  text: {
    position: 'absolute',
    bottom: 132,
    fontSize: 16,
    width,
    textAlign: 'center',
    fontWeight: '300',
    paddingHorizontal: 16,
  },
  title: {
    top: 120,
    fontSize: 26,
    fontWeight: '300',
    width,
    textAlign: 'center',
    paddingHorizontal: 16,
  },
});

export default DefaultSlide;
